<template>
	<view class="content padding">
		<xw-empty :isShow="emptyShow" text="暂无相关数据" textColor="#777777"></xw-empty>
		<block v-for="(item, index) in data" :key="index">
			<view class="content_list padding flex b r margin-bottom">
				<image :src="item.avatar" mode="aspectFill" style="width: 120rpx; height: 120rpx; border-radius: 50%;" class="bg-gradual-blue r"></image>
				<view class="f-1 margin-left-xl flex flex-direction justify-around ok">
					<text>{{ item.user_nickname }}</text>

					<view class="gg flex ">
						<text v-if="item.is_bm == 0" style="color: #3187FB;">未报名</text>
						<text v-else style="color: #F96A15;">已报名</text>
						<text class="margin-left-xl">{{ item.mobile }}</text>
					</view>
				</view>
			</view>
		</block>
	</view>
</template>

<script>
import xwEmpty from '@/components/xw-empty/xw-empty';
export default {
	components: { xwEmpty },
	data() {
		return {
			data: [],
			emptyShow: false,
			page: 1,
			pagesize: 10,
		};
	},
	onShow() {
		this.acctpool();
	},
	methods: {
		async acctpool() {
			let res;
			try {
				res = await this.$request.get('api/Home/custome_pool', {
					data: {
						page: this.page,
						pagesize: this.pagesize,
					},
				});
				console.log('res :>> ', res);
				this.data = [...this.data, ...res.data.data];
			} catch (e) {
				//TODO handle the exception
			}
		},
	},
	onReachBottom() {
		console.log('99999999999 :>> ', 99999999999);
		this.page++;
		this.acctpool();
	},
};
</script>

<style lang="scss" scoped>
.content {
	.content_con {
		width: 100%;
		height: 100%;
		padding: 20rpx;
		// background: pink;
		.content_list {
		}
	}
	.ok {
		text:nth-child(1) {
			font-size: 32rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #333333;
		}
		.gg {
			text:nth-child(1) {
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #666666;
			}
			text:nth-child(2) {
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #666666;
			}
		}
	}
}
</style>
